package com.example.echoewish.util;

import android.util.Log;

public class LogUtil {
    //log日志
    //检测获取数据的日志
    public static String GET_DATA_TAG="get_data";
    //网络连接 回调相关的日志
    public static String CALLBACK_TAG="callback";
    //聊天 功能测试
    public static String CHAT_TAG="chat";


    private static final  int VERBOSE=1;
    private static final  int DEBUG=2;
    private static final  int INFO=3;
    private static final  int WARN=4;
    private static final  int ERROR=5;
    private int level=VERBOSE;

    public void v(String tag,String msg)
    {
        if(level<=VERBOSE)
        {
            Log.v(tag,msg);
        }
    }

    public void d(String tag,String msg)
    {
        if(level<=DEBUG)
        {
            Log.d(tag,msg);
        }
    }

    public void i(String tag,String msg)
    {
        if(level<=INFO)
        {
            Log.i(tag,msg);
        }
    }

    public void w(String tag,String msg)
    {
        if(level<=WARN)
        {
            Log.w(tag,msg);
        }
    }

    public void e(String tag,String msg)
    {
        if(level<=ERROR)
        {
            Log.e(tag,msg);
        }
    }
}
